
package tij4.ch17;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MyCachedThreadPool
{

	public static void main(String[] args)
	{
		ExecutorService exec = Executors.newCachedThreadPool();

		for (int i = 0; i < 5; i++)
		{
			exec.execute(new SimpleThread());
		}
		
		//System.out.println(exec.isShutdown());
		
		exec.shutdown();

		System.out.println("finish");
	}

}
